package com.ywn.service.impl;

import com.alibaba.fastjson.JSON;
import com.ywn.domain.TbContent;
import com.ywn.mapper.TbContentMapper;
import com.ywn.service.TbContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TbContentServiceImpl implements TbContentService {

    @Autowired
    private TbContentMapper tbContentMapper;

    @Override
    public String selectAll() {
        List<Map<String,Object>> list = tbContentMapper.getTbContentList();
        return JSON.toJSONString(list);
    }

    @Override
    public int update(TbContent tbContent) {
        return 0;
    }

    @Override
    public int delete(Long id) {
        return 0;
    }

    @Override
    public int insert(TbContent tbContent) {
        return 0;
    }

    @Override
    public String getById(Long id) {
        return "sxckjdskchds";
    }
}
